<!--{inc(header.view.html)}-->

<div class="content" id="content">
	<div class="top-menu-box">
    	<div class="z">
            <span class="z-f"><a href="#">系统维护</a>&nbsp;&gt;</span>
            <span class="z-f"><a href="#">数据库操作</a></span>
            <div class="z-f-r"><span class="user-t"><a href="{$site_url}"  target="_blank">网站首页</a></span><span class="user-info"></span><a href="index.php?app=default&act=quit" onClick="return confirm('确认退出管理系统吗？');"   >退出管理</a></div>
        </div>
        <div class="top-menu">
        	<ul>
								

			    <li><a href="index.php?app=database&act=optimize" target="mainframe">数据库优化</a></li>
			    <li><a href="index.php?app=database&act=backup" target="mainframe">数据库备份</a></li>
			    <li><a href="index.php?app=database&act=restore" target="mainframe">数据库恢复</a></li>
<li class="current"><a href="#" >数据库操作</a></li>
				
            </ul>
            <div class="clear"></div>
        </div>
    </div>
    
    <div class="main">
<script>
function show2(tt)
{
	if(tt==2)
	{
		txt1.style.display='none';
		txt2.style.display='';
	}else
	{
		txt1.style.display='';
		txt2.style.display='none';
	}
}


function upfile(url,b)
{
	document.getElementById(b).value=url;

}
</script>

<form method="post" name="myform" action="?app=database&act=sql&task=sql">
<table  class="data" >
<tbody>

  <tr> 
    <td class="bold">升级数据库方式:</td>
    <td colspan='2'> 
      <input type="radio" name="t" value="2"  onClick=show2(1) >
      上传sql数据库升级文件包 
        <input type="radio" name="t" value="1"  onClick=show2(2) checked >
      运行sql语句代码 </td>
  </tr>
         
								 
  <tr align="center"> 
    <td colspan="3"> 
      <div id=txt1 style='display:none'> 
        <table width="98%" border="0" cellspacing="0" cellpadding="0">
          <tr align="center"> 
            <td colspan="2"> <b><font color='#FF0000'>请上传要导入的mySQL数据库:</font></b> 
              如果<b><font color="#FF0000">.sql</font></b>后缀文件不允许上传，则请改后缀名为<b><font color="#FF0000">.txt</font></b> 
            </td>
          </tr>
          <tr> 
            <td width="27%">上传成功后，请再点击下面的(立刻执行SQL语句)</td>

            <td width="73%"><input type='text' name='upsql' size='30' value='' id=upsql><br/><iframe name='mainFrame2' frameborder=0 height=150 scrolling=no src='?app=database&act=upfile' width=370></iframe></td>
          </tr>
        </table>
      </div>
    </td>
  </tr>

                    

  <tr  align="center"> 
    <td colspan="3">   <div id=txt2 style='display:'> 
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
            <td colspan="2">每一条sql语句必须用;号分隔开<font color='#FF0000'>(注意，此框今后升级数据库会经常用到，把代码粘贴进去，点击提交就行了)</font></td>
          <td width="0%">&nbsp;</td>
        </tr>
        <tr> 
          <td width="25%">请粘贴要执行的SQL语句代码</td>
          <td width="75%"> 
              <textarea name='sql' cols='70' rows='10'></textarea>
          </td>
          <td width="0%">&nbsp;</td>
        </tr>
      </table>      </div>
    </td>
  </tr>

    <tr> 
    <td width='28%'>&nbsp;</td>
    <td colspan='2'> 
      <input type='submit' name='Submit' value='立刻执行SQL语句' class="buton">
    </td>
  </tr>


 
 </tbody>
</table>
</form> 

 <script type="text/javascript">
function checkall(form) {
	for(var i = 0;i < form.elements.length; i++) {
		var e = form.elements[i];
		if (e.name != 'chkall' && e.disabled != true) {
			e.checked = form.chkall.checked;
		}
	}
}
</script>   	
	
	

	
        
        <div class="notic">
<img  src="{$web_view_dir}style/images/light.gif" align="absmiddle" /> <b>提示: </b> <span >在此导入MYSQL数据库，方便大家的网站升级与维护更新，这样很方便操作数据库，同时也非常简单（导入升级数据库，就像上传文件一样简单），不必再那么麻烦要上传一个2M多的PHPmyadmin那么麻烦. </span>		</div>
    </div>
</div>
<!--{inc(footer.view.html)}-->